﻿using Microsoft.TeamFoundation.VersionControl.Client;
using System.Diagnostics;
namespace TfsMerge.BO
{
    [DebuggerDisplay("ID = {ID}, ParentID = {ParentID}, Name = {Name}, ParentName = {ParentName}")]
    public class UIBranchObject
    {
        public UIBranchObject(BranchObject branch)
        {
            Name = branch.Properties.RootItem.Item;

            if (branch.Properties.ParentBranch != null)
                ParentName = branch.Properties.ParentBranch.Item;
        }

        public string ID { get { return Name; } }
        public string ParentID { get { return ParentName; } }

        public string Name { get; private set; }
        public string ParentName { get; private set; }
    }
}
